package org.zhadoop.stream.cql.semanticanalyzer.parser.context;

import java.util.List;

import org.zhadoop.stream.cql.DriverContext;
import org.zhadoop.stream.cql.exception.CQLException;
import org.zhadoop.stream.cql.exception.SemanticAnalyzerException;
import org.zhadoop.stream.cql.hooks.SemanticAnalyzeHook;
import org.zhadoop.stream.cql.semanticanalyzer.LimitClauseAnalyzer;
import org.zhadoop.stream.cql.semanticanalyzer.SemanticAnalyzer;
import org.zhadoop.stream.cql.semanticanalyzer.parsecontextwalker.ParseContextWalker;
import org.zhadoop.stream.cql.tasks.Task;

/**
 * Limit 子句语法解析内容
 * @author zwd
 *
 */
public class LimitClauseContext extends ParseContext{

	private String limitRows;
	
	@Override
	public String toString() {
		return "LIMIT " + limitRows;
	}
	
	public String getLimitRows() {
		return limitRows;
	}

	public void setLimitRows(String limitRows) {
		this.limitRows = limitRows;
	}

	@Override
	public Task createTask(DriverContext driverContext, List<SemanticAnalyzeHook> analyzeHooks) throws CQLException {
		return null;
	}

	@Override
	public SemanticAnalyzer createAnalyzer() throws SemanticAnalyzerException {
		return new LimitClauseAnalyzer(this);
	}

	@Override
	protected void walkChild(ParseContextWalker walker) {
		
	}

}
